<template>
  <div style="width: 75%; margin-bottom: 50px">
    <AchievementItem
      v-for="(i, index) in AchievementList_show"
      :key="index"
      :item_date="i.item_date"
      :item_imgurl="i.item_imgurl"
      :item_author="i.item_author"
      :item_title="i.item_title"
      :item_profile="i.item_profile"
    ></AchievementItem>
  </div>
</template>

<script>
import AchievementItem from "./AchievementItem.vue";

export default {
  name: "AchievementList",
  components: {
    AchievementItem,
  },
  data: function () {
    return {
      AchievementList_show: [],
      AchievementList: [
        {
          item_date: {
            day: "10",
            mouth: "11",
            year: "2023",
          },
          item_imgurl: require("../assets/test.jpg"),
          item_author: "张三",
          item_title: "奖赏贬值及其调控抑郁症和肥胖的神经机制",
          item_profile: "揭示了前扣带回皮层（ACC）的锥体神经元，尤其是其",
        },
        {
          item_date: {
            day: "10",
            mouth: "11",
            year: "2023",
          },
          item_imgurl: require("../assets/test.jpg"),
          item_author: "张三",
          item_title: "奖赏贬值及其调控抑郁症和肥胖的神经机制",
          item_profile: "揭示了前扣带回皮层（ACC）的锥体神经元，尤其是其",
        },
        {
          item_date: {
            day: "10",
            mouth: "11",
            year: "2023",
          },
          item_imgurl: require("../assets/test.jpg"),
          item_author: "张三",
          item_title: "奖赏贬值及其调控抑郁症和肥胖的神经机制",
          item_profile: "揭示了前扣带回皮层（ACC）的锥体神经元，尤其是其",
        },
        {
          item_date: {
            day: "10",
            mouth: "11",
            year: "2023",
          },
          item_imgurl: require("../assets/test.jpg"),
          item_author: "张三",
          item_title: "奖赏贬值及其调控抑郁症和肥胖的神经机制",
          item_profile: "揭示了前扣带回皮层（ACC）的锥体神经元，尤其是其",
        },
        {
          item_date: {
            day: "10",
            mouth: "11",
            year: "2023",
          },
          item_imgurl: require("../assets/test.jpg"),
          item_author: "张三",
          item_title: "奖赏贬值及其调控抑郁症和肥胖的神经机制",
          item_profile: "揭示了前扣带回皮层（ACC）的锥体神经元，尤其是其",
        },
        {
          item_date: {
            day: "10",
            mouth: "11",
            year: "2023",
          },
          item_imgurl: require("../assets/test.jpg"),
          item_author: "张三",
          item_title: "奖赏贬值及其调控抑郁症和肥胖的神经机制",
          item_profile: "揭示了前扣带回皮层（ACC）的锥体神经元，尤其是其",
        },
        {
          item_date: {
            day: "10",
            mouth: "11",
            year: "2023",
          },
          item_imgurl: require("../assets/test.jpg"),
          item_author: "张三",
          item_title: "奖赏贬值及其调控抑郁症和肥胖的神经机制",
          item_profile: "揭示了前扣带回皮层（ACC）的锥体神经元，尤其是其",
        },
      ],
    };
  },
  methods: {
    changeAchievementListShow(filter_date) {
      this.AchievementList_show = this.AchievementList.filter(function(item){
        if(item.item_date.year < filter_date.start.year || item.item_date.year > filter_date.end.year){

        }
      });
    },
  },
  mounted() {
    this.$EventBus.$on("changeAchievementListShow");
    this.AchievementList_show = this.AchievementList;
  },
};
</script>

<style>
</style>